A. Field of the Invention
The present invention relates to a method and system for building communications between Source Manager software and image acquisition device based on a new protocol, especially to a conversation for converting TWAIN operations into DDE operations.
B. Description of the Prior Art
TWAIN (Tool kits Without An Interesting Name) is a standard software protocol and application programming interface for communicating application software and Data Source software. The application software refers to the software for image application, fax application, or word processor application. The Data Source software refers to the software applied in digital camera, scanner or image database.
TWAIN involves in three parts: the application software, the Source Manager software, and the Data Source software. The application software follows TWAIN specifications to acquire images. The Source Manager software manages the interactions between the application software and the Data Source software. The Data Source software controls the image acquisition device. The communication among these three must follow the TWAIN specifications.
Their interactions can be illustrated in FIG. 1. FIG. 1 shows the TWAIN architecture. As FIG.1 shows, the application layer is for the execution of software application. The protocol layer is for specifying the syntax and semantics defined by TWAIN. The acquisition layer is for controlling the acquisitions of physical or logical acquisition devices by a Data Source software. The device layer is for conventional low-level device drivers.
Refer to FIG. 2, the communication among application software 201, Source Manager software 202 and Data Source software 203 is through two entry points as specified by TWAIN. They are function calls DSM.sub.-- Entry() 204 and DS.sub.-- Entry() 205. DSM refers to Source Manager software and DS refers to Data Source software. The application software 201 and Data Source software 203 communicate to the Source Manager software 202 through the Source Manager software's 202 only entry point, the DSM.sub.-- Entry() function 204. In C programming language, the function call can be represented as:
______________________________________ TW.sub.-- UINT16 FAR PASCAL DSM.sub.-- Entry ( pTW.sub.-- IDENTITY pOrigin, pTW.sub.-- IDENTITY pDest, TW.sub.-- UINT32 DG, TW.sub.-- UINT16 DAT, TW.sub.-- UINT16 MSG, TW.sub.-- MEMREF pData); ______________________________________
The Source Manager software 202 communicates to the Data Source software 203 through the Data Source software's 203 only entry point, the DS.sub.-- Entry o function 205. In C programming language, the function call can be represented as:
______________________________________ TW.sub.-- UINT16 FAR PASCAL DS.sub.-- Entry ( pTW.sub.-- IDENTITY pOrigin, TW.sub.-- UINT32 DG, TW.sub.-- UINT16 DAT, TW.sub.-- UINT16 MSG, TW.sub.-- MEMREF pData). ______________________________________
The DSM.sub.-- Entry() 204 and DS.sub.-- Entry() 205 functions are used to communicate operations. The desired action is defined by the operation triplets passed as three parameters in these function calls. Each triplet specifies a specific action. The three parameters that make up the triplet are Data Group (DG), Data Argument Type (DAT), and Message ID (MSG). Each parameter conveys specific information.